package com.mti.epivisite.common.event
{
	import flash.events.EventDispatcher;
	
	import mx.events.PropertyChangeEvent;

	public class Waypoint extends EventDispatcher
	{
		public function Waypoint()
		{
		}
		
		public static const POI_CHANGE:String = "waypointPoiChange";
		private var _poi:PointOfInterest = null;
		[Bindable(event=POI_CHANGE)]
		public function get poi():PointOfInterest
		{
			return _poi;
		}

		public function set poi(value:PointOfInterest):void
		{
			if( _poi !== value)
			{
				var oldValue:PointOfInterest = _poi;
				_poi = value;
				dispatchEvent(new PropertyChangeEvent(POI_CHANGE, false, false, null, "poi", oldValue, value, this));
			}
		}

		
		private var _x:int = 0;
		[Bindable]
		public function get x():int
		{
			return _x;
		}
		public function set x(value:int):void
		{
			_x = value;
		}
		
		private var _y:int = 0;
		[Bindable]
		public function get y():int
		{
			return _y;
		}
		public function set y(value:int):void
		{
			_y = value;
		}
		
		//Thib : j'suis pas sûr de ce que je fais là, mais techniquement ça devrait être ça
	}
}